﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Data;
using System.ComponentModel.DataAnnotations;

namespace BCDto.TMS.OrderFreightRecord
{
	/// <summary>
	/// 订单运费
	/// </summary>
	public class OrderFreightRecordRequestDto
	{
		/// <summary>
		/// 费用码
		/// </summary>		
		[Display(Name = "费用码")]
		[Required(ErrorMessage = "{0} 不应为空")]
		[StringLength(50, MinimumLength = 2, ErrorMessage = "{0} 长度应大于{2} 且小于{1}")]
		public string CostCode { get; set; }
		/// <summary>
		/// 费用标题
		/// </summary>		
		[Display(Name = "费用标题")]
		[Required(ErrorMessage = "{0} 不应为空")]
		[StringLength(50, MinimumLength = 2, ErrorMessage = "{0} 长度应大于{2} 且小于{1}")]
		public string CostTitle { get; set; }
		/// <summary>
		/// 费用值
		/// </summary>		
		[Display(Name = "费用值")]
		[Required(ErrorMessage = "{0} 不应为空")]
		public decimal CostValue { get; set; }
		/// <summary>
		/// 订单Id
		/// </summary>		
		[Display(Name = "订单Id")]
		[Required(ErrorMessage = "{0} 不应为空")]
		public long OrderId { get; set; }
		/// <summary>
		/// 订单编号
		/// </summary>		
		[Display(Name = "订单编号")]
		[Required(ErrorMessage = "{0} 不应为空")]
		[StringLength(50, MinimumLength = 6, ErrorMessage = "{0} 长度应大于{2} 且小于{1}")]
		public string OrderNo { get; set; }

		/// <summary>
		/// 父级费用码
		/// </summary>
		[Display(Name = "父级费用码")]
		public string ParentCostCode { get; set; }
		/// <summary>
		/// 是否为订单最新运费记录
		/// </summary>		
		[Display(Name = "是否为订单最新运费记录")]
		[Required(ErrorMessage = "{0} 不应为空")]
		public bool IsOrderNewFreight { get; set; }
	}
}

